package pl.edu.agh.mgr.hotel.entities;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Entity
@Table(name = "service_description")
public class ServiceDescription {

	@Id
	@GeneratedValue
	@NotNull
	private long id;

	@Size(max = 100)
	private String name;

	@ManyToOne
	private Country country;

	@ManyToOne
	private Province province;

	@ManyToOne
	private City city;

	@ManyToOne
	private Street street;

	@Size(max = 20)
	private String address;

	@ManyToOne
	private HotelType hotelType;

	@ManyToMany(cascade = CascadeType.ALL)
	private Set<RoomType> roomTypes;

	@Size(max = 100)
	private String wsAddress;

	@Size(max = 100)
	private String wsName;

	public ServiceDescription() {
	}

	public ServiceDescription(long id, String name, Country country,
			Province province, City city, Street street, String address,
			HotelType hotelType, Set<RoomType> roomTypes, String wsAddress,
			String wsName) {
		super();
		this.id = id;
		this.name = name;
		this.country = country;
		this.province = province;
		this.city = city;
		this.street = street;
		this.address = address;
		this.hotelType = hotelType;
		this.roomTypes = roomTypes;
		this.wsAddress = wsAddress;
		this.wsName = wsName;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Country getCountry() {
		return country;
	}

	public void setCountry(Country country) {
		this.country = country;
	}

	public Province getProvince() {
		return province;
	}

	public void setProvince(Province province) {
		this.province = province;
	}

	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}

	public Street getStreet() {
		return street;
	}

	public void setStreet(Street street) {
		this.street = street;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public HotelType getHotelType() {
		return hotelType;
	}

	public void setHotelType(HotelType hotelType) {
		this.hotelType = hotelType;
	}

	public Set<RoomType> getRoomTypes() {
		return roomTypes;
	}

	public void setRoomTypes(Set<RoomType> roomTypes) {
		this.roomTypes = roomTypes;
	}

	public String getWsAddress() {
		return wsAddress;
	}

	public void setWsAddress(String wsAddress) {
		this.wsAddress = wsAddress;
	}

	public String getWsName() {
		return wsName;
	}

	public void setWsName(String wsName) {
		this.wsName = wsName;
	}

}
